<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.yb.domain.member.TsSysuser"%>
<%@page import="com.yb.util.comm.RequestUtil"%>
<%@page import="com.yb.util.comm.Contants"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
			
	String userid = "";
	String userType = "";
	TsSysuser tsSysuser = (TsSysuser) RequestUtil
			.getLoginUserFromSession(request, Contants.SESSION_USER);
	if (tsSysuser == null) {
		userid = "";
		userType = "";
	} else {
		userid = tsSysuser.getId().toString();
		userType = tsSysuser.getType();
	}
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>${tgood.name}-幸福兄弟-幸福兄弟拼购网-抢购-${pcategory.name}-${category.name}</title>
		<meta http-equiv="pragma" content="no-cache"/>
		<meta http-equiv="cache-control" content="no-cache"/>
		<meta http-equiv="expires" content="0"/>
		<meta name="description"
			content="幸福兄弟盐城拼购第一网www.9898sj.com是幸福兄弟营销策划有限公司旗下品牌项目。幸福兄弟盐城拼购第一网是专门针对建材、家具、电器进行同城拼购的一个网站。将全城千万消费者聚拢在一起，用量来获得最低的购买价格。网站聚集了全城1000个知名优质品牌，消费者足不出户就能完成对盐城建材、家具、电器市场进行最深刻的了解，通过拼购网购买是免费的，消费者不需要花一分钱就能实现最省钱、省心、舒心的购买。幸福兄弟盐城拼购第一网将帮助1000个优质品牌企业最大程度的宣传全城，帮助品牌企业好的口碑得到良好的传播，从而实现最好的销售。希望幸福兄弟盐城拼购第一网能为您的幸福生活、您的成功带来帮助！幸福生活，从拼购开始。公司地址，盐城市南城河路9号（迎宾桥北桥头东侧）；联系电话：0515-88175689  88175528" />
		<meta name="keywords"
			content="幸福兄弟，幸福兄弟盐城拼购第一网，幸福兄弟拼购，幸福兄弟拼购网，盐城拼购，盐城拼购，盐城建材拼购，盐城家具拼购，盐城电器拼购，建材拼购，家具拼购，电器拼购" />
		<link href="<%=basePath %>resource/css/index/qianggou/q-index.css"
			rel="stylesheet" type="text/css" />
		<script type="text/javascript"
			src="<%=basePath%>resource/js/jquery-1.4.2.js"></script>
	</head>
	<style type="text/css">
	.px1-4 {
	float: left;
	height: auto;
	width: 724;
}
.px1-4 ul li {
	border-bottom-width: 1px;
	border-bottom-style: dashed;
	border-bottom-color: #CCC;
	float: left;
	padding-top: 7px;
}
.px1-4-1 {
	font-size: 14px;
	font-weight: bold;
	color: #333;
	float: left;
	height: 30px;
	width: 724;
}
.px1-4-2 {
	font-size: 12px;
	line-height: 20px;
	color: #333;
	float: left;
	height: auto;
	width: 724;
	text-indent: 2em;
	padding-bottom: 8px;
}

.px1-4-3 {
	line-height: 17px;
	float: left;
	height: 17px;
	width: 724;
	padding-bottom: 12px;
	padding-left: 20px;
}
.px-24px {
	background-image: url(../resource/img/goodBrand/t2.jpg);
	background-repeat: no-repeat;
	float: right;
	height: 34px;
	width: 34px;
	background-position: center center;
	line-height: 34px;
	color: #FFF;
	text-align: center;
	font-size: 18px;
	font-weight: bold;
}
.px1-4-2 a:link{
	color: red;
}
.px1-4-2 a:visited {
	color: red;
}  /* visited link */
.px1-4-2 a:hover {
	color: #FFA028;
	text-decoration: underline;
}  /* mouse over link */
.px1-4-2 a:active {
	color: #FFA028;
}  /* selected link */
	</style>
	<script>
		function reflashTime(time,id){
	var days = time.substring(3,time.indexOf("天"));
	var hours = time.substring(time.indexOf("天")+1,time.indexOf("小时"))
	var seconds = time.substring(time.indexOf("小时")+2,time.indexOf("分"))
	var minutes = time.substring(time.indexOf("分")+1,time.indexOf("秒"))
	if(days == 0){
		if(hours == 0){
			if(seconds == 0){
				if(minutes == 0){
					$('#'+id).html("已过期")
				}else{
					writeTime(days,hours,seconds,minutes,id);
				}
			}else{
				if(minutes == 0){
					seconds = seconds - 1;
					minutes = 59;
					writeTime(days,hours,seconds,minutes,id);
				}else{
					writeTime(days,hours,seconds,minutes,id);
				}
			}
		}
		else{
			if(seconds == 0){
				hours = hours - 1;
				seconds = 59
				if(minutes == 0){
					seconds = seconds - 1;
					minutes = 59;
					writeTime(days,hours,seconds,minutes,id);
				}else{
					minutes = minutes - 1;
					writeTime(days,hours,seconds,minutes,id);
				}
			}else{
				if(minutes == 0){
					seconds = seconds - 1;
					minutes = 59;
					writeTime(days,hours,seconds,minutes,id);
				}else{
					minutes = minutes - 1;
					writeTime(days,hours,seconds,minutes,id);
				}
			}
		}
	}else{
		if(hours == 0){
			hours = 23;
			days = days -1;
			if(seconds == 0){
				hours = hours - 1;
				seconds = 59
				if(minutes == 0){
					seconds = seconds - 1;
					minutes = 59;
					writeTime(days,hours,seconds,minutes,id);
				}else{
					minutes = minutes - 1;
					writeTime(days,hours,seconds,minutes,id);
				}
			}else{
				if(minutes == 0){
					seconds = seconds - 1;
					minutes = 59;
					writeTime(days,hours,seconds,minutes,id);
				}else{
					minutes = minutes - 1;
					writeTime(days,hours,seconds,minutes,id);
				}
			}
		}
		else{
			if(seconds == 0){
				hours = hours - 1;
				seconds = 59
				if(minutes == 0){
					seconds = seconds - 1;
					minutes = 59;
					writeTime(days,hours,seconds,minutes,id);
				}else{
					minutes = minutes - 1;
					writeTime(days,hours,seconds,minutes,id);
				}
			}else{
				if(minutes == 0){
					seconds = seconds - 1;
					minutes = 59;
					writeTime(days,hours,seconds,minutes,id);
				}else{
					minutes = minutes - 1;
					writeTime(days,hours,seconds,minutes,id);
				}
			}
		}
	}
	setTimeout("reflashTime('剩余："+days+"天"+hours+"小时"+seconds+"分"+minutes+"秒','"+id+"')",1000)
}
var joinQiangouFlag = '<s:property value="#joinQiangouFlag"/>';
var isPingjia = '<s:property value="#isPingjia"/>';
function writeTime(day,hours,second,minute,id){
	var str = "";
	if(day > 0)
		str += "<LI><SPAN>"+day+"</SPAN>天</LI>";
	if(hours > 0)
		str += "<LI><SPAN>"+hours+"</SPAN>小时</LI>";
	if(second > 0)
		str += "<LI><SPAN>"+second+"</SPAN>分</LI>";
	if(minute > 0)
		str += "<LI><SPAN>"+minute+"</SPAN>秒</LI>";
	$('#'+id).html(str);
}
var bodyWidth;
var initFlag = false;
$(function() {
	initFlag = true;
	bodyWidth = $("body").width();
	$("#grayDiv").height($("body").height())
	setTimeout('initevaluate()',1000);
})

function initevaluate(){
	var heihtTemp = GetPageScroll();
	$("#evaluate").css("top",(heihtTemp +200) + 'px');
	setTimeout('initevaluate()',1000);
}
function GetPageScroll() {
	var x, y;
	if (window.pageYOffset) { // all except IE
		y = window.pageYOffset;
		x = window.pageXOffset;
	} else if (document.documentElement && document.documentElement.scrollTop) { // IE 6
		// Strict
		y = document.documentElement.scrollTop;
		x = document.documentElement.scrollLeft;
	} else if (document.body) { // all other IE
		y = document.body.scrollTop;
		x = document.body.scrollLeft;
	}
	return y;
}
function showEvaluate(){
	var heihtTemp = GetPageScroll();
	$("#evaluateDiv").css("top", (heihtTemp + 60) + 'px').css("left",
			(bodyWidth - 1000) / 2 + "px");
	if('<%=userid%>' == ''){
  		alert('您还未登录，请先登录!');
  		return;
  	}
  	if('<%=userType%>' != '3'){
  		alert('只有业主才可以进行评价!');
  		return;
  	}
  	if(joinQiangouFlag != '1'){
  		alert('只有购买过此商品的业主才可以进行评价!');
  		return;
  	}
	if(isPingjia!='0'){
  		alert('您已经评价过该商品，如需要重新评价，请进入"个人管理——评价记录"进行修改!');
  		return;
  	}
	$("#grayDiv,#evaluateDiv").show();
	parent.$("#flexDiv").hide()
}
function hideEvaluate(){
	$("#grayDiv,#evaluateDiv").hide();
	parent.$("#flexDiv").show()
}
function bulidPagnation1(totalcount, limit, page, id, renderId, nowId, endId) {
	var previewPageStr = '<span class="disabled">&lt;</span>';
	var nextPageStr = '<span><a href="#?page=2">&gt;</a></span>';
	var currentPageStr = '<span class="current">1</span>';
	var showPageStr = '<a href="#?page=2">2</a>';
	var totalPages = Math.floor((totalcount + limit - 1) / limit);
	var startPage = nowId;
	var endPage = startPage + 4;
	if (page >= 4)
		if ((page - nowId) >= 3) {
			startPage = page - 2;
			endPage = startPage + 4;
		}
	if (nowId != 1)
		if ((endId - page) >= 3) {
			startPage = page - 2;
			endPage = startPage + 4;
		}
	if (endPage > totalPages) {
		endPage = totalPages;
		nextPageStr = '<span class="disabled">&gt;</span>';
	} else {
		nextPageStr = '<a href="javascript:bulidPagnation1(' + totalcount + ','
				+ limit + ',' + (page + 1) + ',\'' + id + '\',\'' + renderId
				+ '\',' + startPage + ',' + endPage + ')">&gt;</a>';
	}
	if (startPage > 1) {
		previewPageStr = '<a href="javascript:bulidPagnation1(' + totalcount
				+ ',' + limit + ',' + (page - 1) + ',\'' + id + '\',\''
				+ renderId + '\',' + startPage + ',' + endPage + ')">&lt</a>';
	}
	var str = previewPageStr;
	for (var i = startPage; i <= endPage; i++) {
		if (i == page)
			str += '<span class="current">' + i + '</span>';
		else
			str += '<a href="javascript:bulidPagnation1(' + totalcount + ','
					+ limit + ',' + (i) + ',\'' + id + '\',\'' + renderId
					+ '\',' + startPage + ',' + endPage + ')">' + i + '</a>';
	}
	str += nextPageStr;
	$('#meidTbar1').html(str);
	if (!initFlag)
		return;
	$.get('brand/findAllEvaluate.shtml?flag=2&pageNo=' + page + '&limit=' + limit
			+ '&id=' + id, function(mes) {
		var json = eval('(' + mes + ')');
		var str = '<ul>';
		for (var i = 0; i < json[0]['list'].length; i++) {
			var pjid = json[0]['list'][i]['id'];
			str += '<li><table width="940" border="0" cellspacing="0" cellpadding="0">' +
					'<tr><td width="65" align="center" valign="top" style="line-height:24px">' +
					'<img src="../resource/img/goodBrand/3'+json[0]['list'][i]['sex']+'.jpg" width="23" height="22" /><br />' +json[0]['list'][i]['username']+
					'</td><td width="5">&nbsp;</td><td width="870" align="left" valign="top">' +
					'<div class="px1-4-1">'+json[0]['list'][i]['title']+'</div>'+
					'<div class="px1-4-2">'+json[0]['list'][i]['content']+'&nbsp;&nbsp;(评论时间:<s:property value="createTimeStr"/>)';
			if((json[0]['list'][i]['reply']==null||""==json[0]['list'][i]['reply'])&&loginuserId==shangjiaId){
				str += '  &nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:showReplyArea(\''+pjid+'\')">商家回复</a>';
			}
			str += '</div>';
				if(json[0]['list'][i]['reply']!=null&&""!=json[0]['list'][i]['reply']){
					str+=' <div class="px1-4-3">' +
							'<table width="" border="0" cellspacing="0" cellpadding="0"><tr>' +
							' <td width="8" height="17" style="background:url(../resource/img/goodBrand/4.jpg) no-repeat">&nbsp;</td>' +
							'<td width="" style="background:url(../resource/img/goodBrand/5.jpg) repeat-x; color:#1b638d"><span>' + brandName+
							'</span>回复：'+json[0]['list'][i]['reply']+' </td>' +
							' <td width="8" height="17" style="background:url(../resource/img/goodBrand/6.jpg) no-repeat">&nbsp;</td>' +
							'</tr></table></div>';
				}else{
					str+= '' +
							'<table width="" border="0" cellspacing="0" cellpadding="0" style="display: none" id="replyArea_'+pjid+'">' +
									'<tr>' +
									'<td width="" style="background:url(../resource/img/goodBrand/5.jpg) repeat-x; color:#1b638d"><textarea id="reply_'+pjid+'" style="width: 500px;" rows="3"></textarea></td>' +
									'<td valign="bottom">&nbsp;&nbsp;<input onclick="reply(\''+pjid+'\')" value="提交回复" type="button"/>&nbsp;&nbsp;<input type="button" value="关闭" onclick="hideReplyArea(\''+pjid+'\')"/></td>' +
									'</tr></table>';
				}
				str += '</td></tr></table></li>';
		}
		str += '</ul>';
		$('#evaluateContent').html(str);
	})
}
	</script>
	<body>
	<div id="grayDiv" style="z-index:20;display: none;background: #ECECEC;width: 100%;height: 100%;position: absolute;filter:alpha(opacity=50);-moz-opacity:0.5;-khtml-opacity: 0.5;opacity: 0.5;">
	</div>
		<center>
			<jsp:include page="../top.jsp"></jsp:include>
		</center>
		<div id="evaluateDiv" style="z-index:22;display: none;position: absolute;width: 1000px;height: 500px;border: 0px solid #33A7D1;background:url('<%=basePath %>resource/img/brand/win_bg2.png');">
<div style="width: 100%;height: 50px;border-bottom: 2px solid #33A7D1;">
	<table width="99%" height="100%">
	<tr><td style="color: #000000;font-weight: bold;font-size: 16px;padding-left: 5px;">对${tgood.name}进行评价</td><td width="50px" align="right" valign="middle" style="font-weight: bold;padding-right:10px;cursor: pointer;" onclick="hideEvaluate();">&nbsp;</td></tr>
	</table>
</div>
<div style="height445px; overflow: auto;" align="center" >
<form name="form1" target="pingjiaFrame" method="post" action="../pingjia/saveOrUpdate.shtml" >
	<table width="70%" cellpadding="0" cellspacing="5">
	<tr>
		<td align="right" width="15%" class="quandianping1" style="text-align: right;">
					评价：
		</td>
		<td align="left">
				<select name="pg.type" id="pgtype">
					<option selected value="-1">
						-请选择-
					</option>
					<option value="1">
						好评
					</option>
					<option value="2">
						差评
					</option>
				</select>
				<em style="color: #F00">*</em>
		</td>
	</tr>
	<tr>
		<td align="right" class="quandianping1" style="text-align: right;">
					标题：
		</td>
		<td align="left">
				<input type="text" name="pg.title" id="pgtitle" />
				<em style="color: #F00">*</em>
		</td>
	</tr>
	<tr>
		<td align="right" valign="middle" class="quandianping1" style="text-align: right;">
					内容：
		</td>
		<td align="left">
			<div class="quandianping">
				<textarea name="pg.content" style="width: 500px" rows="10" id="pgcontent"></textarea>
				<br />
			</div>
		</td>
	</tr>
	<tr>
		<td colspan="2" >
				<input name="pg.yeId" id="yeId" value="<%=userid %>" type="hidden"/>
				<input name="pg.pjtype" id="pjtype" value="2" type="hidden"/>
				<input name="pg.brandId" id="brandId" type="hidden" value="${tgood.brandId}"/>
				<input type="submit" name="button" style="display: none;" id="pjbu"/>
				<input type="button" onclick="pingjia();" name="button" id="button" value="提交"/>
		</td>
	</tr>
	</table>
	</form>
</div>
</div>
		<div id="nav">
			<table width="1000" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td
						style="background: url(<%=basePath%>resource/img/goodBrand/sh-1.jpg) no-repeat; height: 39px; width: 11px">
						&nbsp;
					</td>
					<td width="982"
						style="background: url(<%=basePath%>resource/img/goodBrand/sh-2.jpg) repeat-x; line-height: 33px">
						<div id="nav-1">
							<a href="<%=basePath%>home.shtml">首页</a> &gt;
							<a
								href="<%=basePath%>showCategory.shtml?categoryId=${category.id}&pid=${pcategory.id}">${pcategory.name}</a>
							&gt;
							<a
								href="<%=basePath%>showCategory.shtml?categoryId=${category.id}&pid=${pcategory.id}">${category.name}</a>
							&gt; ${tgood.name}
						</div>

					</td>
					<td
						style="background: url(<%=basePath%>resource/img/goodBrand/sh-3.jpg) no-repeat; height: 39px; width: 7px">
						&nbsp;
					</td>
				</tr>
			</table>
		</div>
		<div id="Q-mian">
			<table width="1000" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td width="724" align="left" valign="top">
						<table width="724" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td height="" valign="top">
									<div class="q-1">
										<div class="q-2">
											<div class="right1">
												<table width="690" border="0" cellspacing="0"
													cellpadding="0">
													<tr>
														<td width="210" align="left" valign="top">
														<div style="height:43px;">&nbsp;
														</div>
															<div class="r-1-good">
																<div class="r-1-1-good">
																	<img src="<%=basePath%>resource/img/goodBrand/an.jpg" width="190" height="40" />
																</div>
															</div>
															<div class="r-2-good">
																<UL class=deal-discount>
																	<LI>
																		<P>
																			市场价
																		</P>
																		<P class=red>
																			<SPAN style="TEXT-DECORATION: line-through">${tgood.priceFormat}</SPAN>元
																		</P>
																	</LI>
																	<LI>
																		<P>
																			现价
																		</P>
																		<P class=red>
																			<SPAN>${tgood.uppriceFormat}</SPAN>元
																		</P>
																	</LI>
																	<LI style="BORDER-RIGHT-STYLE: none">
																		<P>
																			节省
																		</P>
																		<P class=red>
																			<SPAN>${tgood.priceFormat-tgood.uppriceFormat}</SPAN>元
																		</P>
																	</LI>
																</UL>

																<DIV id=deal-timeleft
																	class="deal-box deal-timeleft deal-on" diff="30986000"
																	curtime="1335684214000">
																	<div class="px180px">
																		<H3>
																			剩余时间
																		</H3>
																		<DIV class=timer>
																			<IMG src="<%=basePath%>resource/img/goodBrand/timer.png"/>
																		</DIV>
																	</div>
																	<DIV class=limitdate>
																		<UL id=counter>
																			<script>
																			reflashTime('${tgood.activeTime}','counter');
																			</script>
																		</UL>
																	</DIV>
																</DIV>

															</div>
															<div class="r-3">
																<DIV id=deal-status class="deal-box deal-status">
																	<STRONG><table width="" border="0"
																			cellspacing="0" cellpadding="0">
																			<tr>
																				<td width="37" height="30">
																					<img src="<%=basePath%>resource/img/goodBrand/zL.jpg" width="37" height="30" />
																				</td>
																				<td bgcolor="#FFFFFF">
																					<script>
																						var count = '${tgood.joinCount}';
																						var cl = count.length;
																						for(var i = 0; i < cl; i++){
																							document.write('<div class="px1323px">'+(count.substr(i,1))+'</div>');
																						}
																					</script>
																				</td>
																				<td width="94" height="30">
																					<img src="<%=basePath%>resource/img/goodBrand/zR.jpg" width="94" height="30" />
																				</td>
																			</tr>
																		</table> </STRONG>
																	<DIV style="PADDING-LEFT: 0px" class=progress-pointer id="progressT">
																		<SPAN><img src="<%=basePath%>resource/img/goodBrand/bg-progress-pointer.gif"
																				width="13" height="11" />
																		</SPAN>
																	</DIV>
																	<DIV class=progress-bar>
																		<DIV class="progress-right" style="PADDING-LEFT: 0px" id="progressB">
																			<img src="<%=basePath%>resource/img/goodBrand/bg-progress-top-r.gif" width="3"
																				height="5" />
																		</DIV>
																	</DIV>
																	<DIV class=cf>
																		<DIV class=min>
																			0
																		</DIV>
																		<DIV class=max id="maxCount">
																			100
																		</DIV>
																	</DIV>
																</DIV>
															</div>
														</td>
														<td width="15">
															&nbsp;
														</td>
														<td width="" align="left"  valign="top">
														<h1 >
											                  	     本次抢购：${tgood.name}
											                       </h1>
															<div class="r-tu">
																<s:if test='%{#tgood.bigImg != null && #tgood.bigImg != ""}'>
																<img src="<%=basePath%>${tgood.bigImg}" width="460"
																	height="270" />
																</s:if>
																<s:else>
																<img src="<%=basePath%>${tgood.imgSrc}" width="460"
																	height="270" />
																</s:else>
															</div>
															<div class="r-4">
																<s:if test='#tgood.brandName!=null&&#tgood.brandName!=""'>
																<font style="font-size:14px;color:#333333">店铺名称：<s:property value="#tgood.brandName"/><br/>
																</s:if>
																<s:if test='%{#tgood.content == null||#tgood.content == ""}'>&nbsp;</s:if><s:else><s:property value="#tgood.content" escape="false"/></s:else>
																</font>
															</div>
														</td>
													</tr>
												</table>
											</div>
										</div>
									</div>
								</td>
							</tr>
							<tr>
								<td height="15">
									&nbsp;
								</td>
							</tr>
							<tr>
								<td valign="top">
									<div class="q-3">
										<div class="q-4">
											${tgood.goodsDesc}
										</div>
									</div>
								</td>
							</tr>
						</table>
					</td>
					<td width="20">
						&nbsp;
					</td>
					<td width="256" valign="top">
						<DIV id=leftgood align=center>
							<DIV class=leftTop></DIV>
							<DIV style="MARGIN-TOP: 0px" class=leftBody align=center>
								<DIV style="MARGIN-TOP: 0px" class=left1>
									<DIV class=left1-c align=left>
									<input type="hidden" value="${tgood.id}" id="goods" />
									<input type="hidden" value="${category.id}" id="categoryId" />
										<p style="font-size: 13px;font-weight: 200;text-indent:2em; margin-top: 0px">
											${tgood.announcement}
										</p>
										<s:if test='#tgood.announcement == null || "" == #tgood.announcement'>
										<P
											style="LINE-HEIGHT: 200%; TEXT-INDENT: 2em; LETTER-SPACING: 2px; FONT-SIZE: 14px; FONT-WEIGHT: 200">
											请真实填写商家咨询了解的相关信息，如果不实而造成纠纷，后果自负。为了舒心拼购，请主动保留相关证据。
										</P>
										</s:if>
									</DIV>
									<DIV class=left2-2>
										<TABLE border=0 cellSpacing=0 cellPadding=0 width=240>
											<TBODY>
												<TR style="HEIGHT: 100px">
													<TD align=left>
														<DIV
															style="BACKGROUND: url(<%=basePath%>resource/img/goodBrand/canjia-qg.jpg) no-repeat; HEIGHT: 75px"
															class=left2-4 align=right>
															<NOBR>
															<SPAN><s:if test='%{#tgood.tel == null||#tgood.tel == ""}'>暂无资料</s:if>
																	<s:else>
																		${tgood.tel}
																	</s:else>&nbsp;&nbsp;</SPAN>
															</NOBR>
														</DIV>
													</TD>
												</TR>
												<TR>
													<TD colSpan=2>
														<TABLE border=0 cellSpacing=0 cellPadding=0 width=230>
															<TBODY>
																<TR>
																	<TD width=80 align=right>
																		<DIV class=quandianping>
																			<LABEL for=textfield>
																				真实姓名：
																			</LABEL>
																		</DIV>
																	</TD>
																	<TD align=left>
																		<DIV class=quandianping>
																			<INPUT style="WIDTH: 100px" id=realname type=text
																				name=textfield>
																			<EM style="COLOR: #f00">*</EM>
																		</DIV>
																	</TD>
																</TR>
																<TR>
																	<TD align=right>
																		<DIV class=quandianping>
																			<LABEL for=textfield2>
																				手机：
																			</LABEL>
																		</DIV>
																	</TD>
																	<TD align=left>
																		<DIV class=quandianping>
																			<INPUT style="WIDTH: 100px" id=phone type=text
																				name=textfield2>
																			<EM style="COLOR: #f00">*</EM>
																		</DIV>
																	</TD>
																</TR>
																<TR>
																	<TD align=right>
																		<DIV class=quandianping>
																			<LABEL for=textfield3>
																				备用电话：
																			</LABEL>
																		</DIV>
																	</TD>
																	<TD align=left>
																		<DIV class=quandianping>
																			<INPUT style="WIDTH: 100px" id=tel type=text
																				name=textfield3>
																		</DIV>
																	</TD>
																</TR>
																<TR>
																	<TD vAlign=top align=right>
																		<DIV class=quandianping>
																			<LABEL for=textarea>
																				具体地址：
																			</LABEL>
																		</DIV>
																	</TD>
																	<TD align=left>
																		<DIV class=quandianping>
																			<TEXTAREA style="WIDTH: 120px" id=address rows=5
																				cols=20 name=textarea></TEXTAREA>
																		<!-- 	<BR>
																			<SPAN style="LINE-HEIGHT: 25px">商家提供免费送货上门<EM
																				style="COLOR: #f00">*</EM> </SPAN> -->
																		</DIV>
																	</TD>
																</TR>
															</TBODY>
														</TABLE>
														<TABLE border=0 cellSpacing=0 cellPadding=0 width=230>
															<TBODY>
																<TR>
																	<TD
																		style="PADDING-LEFT: 10px; PADDING-RIGHT: 10px; PADDING-TOP: 10px">
																		<DIV class=quandianping1>
																			<EM style="COLOR: #f00">*</EM>${tgood.stateMent}
																		</DIV>
																	</TD>
																</TR>
																<TR>
																	<TD height=30>
																		<DIV class=tijiao>
																			<A href="javascript:add();">提&nbsp;&nbsp;交&nbsp;</A>
																		</DIV>
																	</TD>
																</TR>
																<TR>
																	<TD height=10>
																		&nbsp;
																	</TD>
																</TR>
															</TBODY>
														</TABLE>
													</TD>
												</TR>
											</TBODY>
										</TABLE>
									</DIV>
								</DIV>
								<DIV class=left1111 align=center>
									<DIV class=left3-1 align=left>
										<NOBR>
										已参加
										<FONT
											style="PADDING-LEFT: 3px; PADDING-RIGHT: 3px; FONT-WEIGHT: bold">${tgood.shortName}</FONT>抢购的业主：
										</NOBR>
									</DIV>
									<DIV class=left1-2>
										<UL>
											<s:if test="%{#goodsmemberlist == null||#goodsmemberlist.size()==0}"><LI>暂时没有业主参与</LI></s:if>
											<s:iterator value="#goodsmemberlist" status="stat" var="member">
												<s:if test="#member.userId!=0">
												<li>
													<p style="BORDER-BOTTOM: #c2d5e3 1px dotted; COLOR: #036; FONT-SIZE: 14px">
													<table width="100%" cellpadding="0" cellspacing="0">
														<tr>
															<td width="45%" align="left"><s:property value="#member.showName" /></td><td align="left">
															<span style="color: #F60; font-size: 14px"><s:property
																value="#member.joinDateFormat" />
														</span>
															</td>
														</tr>
													</table>
													</p>
												</li>
												</s:if>
											</s:iterator>
										</UL>
									</DIV>
								</DIV>
							</DIV>
							<DIV class=leftBotton></DIV>
						</DIV>

					</td>
				</tr>
			</table>
		<div id="divBlock_7">
<table style="margin-top: 8px;" width="724" border="0" cellspacing="0" cellpadding="0" align="left">
  <tr>
    <td height="34px" style="background:url(<%=basePath%>resource/img/goodBrand/t1.jpg) repeat-x">
    <table width="724" border="0" cellspacing="0" cellpadding="0">
	  <tr>
	    <td width="50px" height="34" align="right">
	      <div id="number_7" class="px-24px"></div></td>
	    <td style="font-size:18px; color:#000000; font-family:'微软雅黑'">点评口碑</td>
	    <td>
	    <div class="yahoo" id="meidTbar1">
			<script>bulidPagnation1(parseInt('<s:property value="#pjPu.totalRecords"/>',10),12,1,'${tgood.brandId}','meidTbar1',1,5)</script>
		</div>
	    </td>
	  </tr>
	</table>
    </td>
  </tr>
  <tr>
    <td>
    <table width="724" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td height="10px"></td>
  </tr>
  <tr>
    <td width="600" style="padding-left:30px; padding-right:30px; padding-top:10px; padding-bottom:10px">
    
      <div class="px1-4" id="evaluateContent">
        <ul>
        <s:iterator value="#pjPu.list" status="stat" var="TgPingJia">
          <li>
	          <table width="600" border="0" cellspacing="0" cellpadding="0">
				  <tr>
				    <td width="65" align="center" valign="top" style="line-height:24px"><img src="<%=basePath%>resource/img/goodBrand/3<s:property value="sex"/>.jpg" width="23" height="22" /><br />
				      <s:property value="username"/></td>
				    <td width="5">&nbsp;</td>
				    <td width="870" align="left" valign="top">
				      <div class="px1-4-1"><s:property value="title"/></div>
				      <div class="px1-4-2"><s:property value="content" escape="false"/>&nbsp;&nbsp;(评论时间:<s:property value="createTimeStr"/>)  <s:if test="reply == null&&#session.userinfo.id == #tgBrand.sysuserId">&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:showReplyArea('<s:property value="id"/>')">商家回复</a></s:if></div>
				      <s:if test="reply != null">
				      <div class="px1-4-3">
				        <table width="" border="0" cellspacing="0" cellpadding="0">
				          <tr>
				            <td width="8" height="17" style="background:url(<%=basePath%>resource/img/goodBrand/4.jpg) no-repeat">&nbsp;</td>
				            <td width="" style="background:url(<%=basePath%>resource/img/goodBrand/5.jpg) ; color:#1b638d"><span>${tgBrand.name}</span>回复： <s:property value="reply"/></td>
				            <td width="8" height="17" style="background:url(<%=basePath%>resource/img/goodBrand/6.jpg) no-repeat">&nbsp;</td>
				          </tr>
				        </table>
				      </div>
				      </s:if>
				    </td>
				  </tr>
	         </table>
         </li>
		</s:iterator>
        </ul>
      </div>
      
    </td>
  </tr>
  <tr>
    <td height="10px">&nbsp;</td>
  </tr>
</table>
    </td>
  </tr>
</table>
</div>	
		</div>
		<iframe name="pingjiaFrame" id="pingjiaFrame" src="" style="display: none"></iframe>
<div id="evaluate" style="position: absolute;z-index: 10;right: 0px;top: 200px;width: 72px;">
<img onclick="showEvaluate()" title="评价" width="72px" src="<%=basePath %>resource/img/brand/evaluate.png" style="cursor: pointer;"/>
</div>
		<iframe src="<%=basePath%>/index/footer.html" frameborder="0"
			scrolling="no" width="100%" ; height="90px;"></iframe>
	</body>
	<script>
		$(function(){
			var maxJoinCount = '${tgood.maxCount}';
			if(maxJoinCount == ""||maxJoinCount=="0")
				maxJoinCount = 100;
			document.getElementById('maxCount').innerHTML = maxJoinCount;
			if(count > 0){
				var percent = Math.floor(count*100/maxJoinCount) +"%";
				$("#progressT,#progressB").css("padding-left",percent);
			}
		})
		
		  var  basepath="<%=basePath%>";
    var userid="<%=userid%>"
  function add(){
              /*if(userid==""){
                 alert("请先登录");
                 return;
              }*/
              var  realname= $("#realname").val();
              if(""== realname){
                  alert("请填写真实姓名");
                   $("#realname").focus();
                   return ;
              }
             
              var  phone= $("#phone").val();
              if(""== phone){
                  alert("请填写手机");
                 $("#phone").focus();
                  return ;
              }
              var  tel= $("#tel").val();  
              
              var  address= $("#address").val();  
              if(""== address){
                  alert("请填写具体地址");
                  $("#address").focus();
                  return ;
              }
              if(address.length>50){
                   alert("请填写具体地址字数太长");
                  $("#address").focus();
                  return ;
              }
              $.post( basepath+"tgBrandMember/saveOrUpdate.shtml?tgBrandMember.name="+encodeURI(encodeURI(realname))+"&tgBrandMember.tel="+phone+"&tgBrandMember.brandId="+document.getElementById("goods").value+"&tgBrandMember.telephoe="+tel+"&tgBrandMember.address="+encodeURI(encodeURI(address))+"&tgBrandMember.userId="+userid+"&tgBrandMember.type=0"
               ,function(message){
				if(message == "1"){
					alert("发布成功，请等待审核");
			         $("#realname").val("");
			         $("#phone").val("");
			         $("#address").val(""); 
			         $("#tel").val(""); 
				}else if(message == "2") {
					alert("申请出错");
					return;
				}
			})
	
            
		}
		
		
		function addfavorite()
{
    window.external.addFavorite('http://www.9898sj.com','幸福兄弟')  ;
}

function pingjia(){
	if('<%=userid%>' == ''){
  		alert('您还未登录，请先登录!');
  		return;
  	}
  	if('<%=userType%>' != '3'){
  		alert('只有业主才可以进行评价!');
  		return;
  	}
  	if(joinQiangouFlag != '1'){
  		alert('只有购买过此商品的业主才可以进行评价!');
  		return;
  	}
  	if(isPingjia!='0'){
  		alert('您已经评价过该商品，如需要重新评价，请进入"个人管理——评价记录"进行修改!');
  		return;
  	}
	var  type=$("#type").val();
       if("-1"==type)
       {
          alert('请选择评价态度');
          $("#type").focus();
         return;
       }
       var  title=$("#title").val();
       if(""==title){
          alert("请选择标题");
          $("#title").focus();
          return;
       }
       var content =$("#pgcontent").val();
        if(""==content){
          alert("请填写评价内容");
          $("#pgcontent").focus();
          return;
       }
       document.getElementById('pjbu').click();
		alert('评价成功');
		hideEvaluate();
		$("#pgtitle").val("");
		$("#pgcontent").val("");
		$("#pgtype").val("");
       // document.forms[0].submit();
}
function addResult(mes){
	if(mes == '1'){
		// alert('评价成功');
		$("#pgtype").val("");
		$("#pgtitle").val("");
		$("#pgcontent").val("");
	}else{
		// alert('评价失败');
	}
	hideEvaluate();
}
	if ('<s:property value="#pjPu.list.size"/>' == '0') {
		$("#divBlock_7").hide();
	} else {
		$("#divBlock_7").show();
	}
	</script>
</html>

